<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>贴吧</title>
    <script src="static/js/jquery/jquery.js"></script>
    <script src="static/js/jquery-form/jquery.form.js"></script>
    <script src="static/js/vue/vue.min.js"></script>
</head>
<body>

<h2>贴吧信息</h2>
<form style="border:1px solid black">
    <div id="app">
        <dl style="border:1px solid black" class="clearfix" v-for="c in list">
            {{c.id}}
            <a href=""> {{c.title}} </a>
            {{c.name}} {{c.time}}
        </dl>
    </div>
</form>

<script>
    const vue = new Vue({
        el:"#app",
        data:{
            list:[]
        },
        mounted:function () {
            var _this = this;

            //页面加载前 发送ajax请求 ,查询后端参数
            url="http://localhost:8080/postbars/list";
            $.get(url,function (data) {
                console.log(data.data);
                _this.list = data.data ;
            })
        }
    })
</script>

</body>
</html>